Method A With multipartRequest, one could access methods such as getFiles(...), getFile(...), getContentType(...), hasErrors(), getErrors() etc to handle the file uploaded. Method B (Recommended) <form name="myForm" enctype="multipart/form-data"> <input type="file" name="myDoc" value="Browse ..." /> <input type="submit" /> </form> The action class would requires any (or none, but if none what is the point?) of three methods being defined, in order for the interceptor to populate it with uploaded file information public void setMyDoc(File myDoc) { ...} public void setMyDocContentType(String contentType) { .... } public void setMyDocFileName(String filename) { .... } with these methods, one could do whatever is needed with the uploaded file. If multiple files are uploaded as in following: <form name="myForm" enctype="multipart/form-data"> <input type="file" name="myDoc" value="Browse File A ..." /> <input type="file" name="myDoc" value="Browse File B ..." /> <input type="file" name="myDoc" value="Browse File C ..." /> <input type="submit" /> </form> The action class needs only make the corresponding method an array, orders followed such that getMyDoc()0 will have its content type as getMyDoc()0 and its file name as getMyDoc()1. public void setMyDoc(File[] myDocs) { ... } public void setMyDocContentType(String[] contentTypes) { ... } public void setMyDocFileName(String[] fileNames) { ... } Extra Information: webwork.multipart.parser (as of WW2.2 its jakarta by default) @see webwork.properties |